package com.cn.zengzeng.spbzengzeng.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 日志级别示例demo
 * @Author: ZhangZengZeng
 * @Date: 2022/11/10 2:02
 */
@Configuration
@Slf4j
public class LogDemoConfig {
    @Bean
    public String logMethod(){
        // 从trace到error日志级别由低到高
        // 可以调整输出的日志级别，日志就只会在这个级别后的高级别生效
        log.trace("LogDemoConfig trace日志...");
        log.debug("LogDemoConfig debug日志...");
        log.info("LogDemoConfig info日志...");
        log.warn("LogDemoConfig warn日志...");
        log.error("LogDemoConfig error日志...");
        return "hello log";
    }
}

